<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
</head>

<body>
    <div id="app"></div>
    <template id="my-app">
        <div :style="{
            color:fontcolor,
            fontSize:fontsize+'px'
        }">帆帆</div>

        <div :style="styleObj">航海</div>

        <div :style = "[styleObj,styleObj2]">胡总</div>
    </template>

    <script>
        const App = {
            template: '#my-app',
            data() {
                const fontcolor = 'red'
                const fontsize = 50
                const styleObj = {
                    color:'green',
                    fontWeight:'bold',
                }
                const styleObj2 = {
                    fontSize:'40px',
                    background:'yellow'
                }
                return {
                    fontcolor,
                    fontsize,
                    styleObj,
                    styleObj2
                }
            },
            methods: {

            }
        }


        Vue.createApp(App).mount('#app')
    </script>
</body>

</html>